Definition

If ff, gg are two functions from \mathbb{N} to \mathbb{N}, then we say that

  1. f=O(g)f = O(g) if c\exists c such that f(n)cg(n)f(n) \leq c \cdot g(n) for every sufficiently large nn
  2. f=Ω(g)f = \Omega(g) if g=O(f)g = O(f)
  3. f=Θ(n)f = \Theta(n) if f=O(g)f = O(g) and g=O(f)g = O(f)
  4. f=o(g)f = o(g) if for every ϵ>0\epsilon>0, f(n)ϵg(n)f(n) \leq \epsilon \cdot g(n) for every sufficiently large nn
  5. f=ω(g)f = \omega(g) if g=o(f)g = o(f)

Notation: may also write as f(n)=O(g(n))f(n) = O(g(n)) etc.

Extensions

See also


References

  1. S. Arora, B. Barak. Computational Complexity: A Modern Approach, Cambridge University Press, 2009, pp. 3-4.
  2. https://en.wikipedia.org/wiki/Big_O_notation
  3. https://cs.stackexchange.com/questions/63264/what-does-tilde-mean-in-big-o-notation